home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / jot < prev    next >
Text File  |  2001-03-21  |  918b  |  30 lines

  1. Synopsis:
  2.    $jot(<start> <stop>)
  3.  
  4. Technical:
  5.    This script is used to obtain a series of integers, from the first input
  6.    to the second.  Negative numbers are permitted, and the series may be
  7.    ascending or descending.
  8.  
  9. Practical:
  10.    This function is used to generate a number range.  One popular use for
  11.    this is in conjunction with $chr(), allowing a range of ascii characters
  12.    to be returned (which then might be stripped from another string, etc.).
  13.  
  14. Returns:
  15.    * number range from start to stop
  16.    * if less than 2 arguments, empty string
  17.    * if more than 2 arguments, first argument
  18.    * if non-digits entered, 0 (zero)
  19.  
  20. Examples:
  21.    $jot(2 6)             returns "2 3 4 5 6"
  22.    $jot(3 -2)            returns "3 2 1 0 -1 -2"
  23.    $jot(4)               returns ""  (empty string)
  24.    $jot(4 6 8)           returns "4"
  25.    $jot(a 4)             returns "0"
  26.  
  27. See Also:
  28.    chr(6); isdigit(6)
  29.  
  30.